import axios from "../utils/axios";
export const listCategory=() =>{
    return axios({
        url: '/category',
        method: 'get'
    })
}
export const listCategoryByPage = (page,limit,queryDto)=>{
    return axios({
        url:`/category/${page}/${limit}`,
        method:'post',
        data:queryDto
    })
}
export const updateCategory =(category) =>{
    return axios({
        url:`/category`,
        method:'put',
        data: category
    }) 
}
export const addCategory= (category)=>{
    return axios({
        url:'/category',
        method:'post',
        data:category
    })
}

export const removeCategory = (cid)=>{
    return axios({
        url:`/category/${cid}`,
        method:'delete'
    })
}